package com.dongdong.service.impl;

import com.dongdong.mapper.TbGoodsDescMapper;
import com.dongdong.model.TbGoodsDesc;
import com.dongdong.service.GoodsDescService;
import com.dongdong.vo.GoodsDescVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsDescServiceImpl implements GoodsDescService {

    @Autowired
    private TbGoodsDescMapper goodsDescMapper;

    @Override
    public GoodsDescVO getGoodsDescById(Long id) {
        TbGoodsDesc tbGoodsDesc = goodsDescMapper.selectByPrimaryKey(id);
        GoodsDescVO descVO = new GoodsDescVO();
        BeanUtils.copyProperties(tbGoodsDesc, descVO);
        return descVO;
    }
}
